#ifndef VON_NEUMAN_1_H
#define VON_NEUMAN_1_H

#include <vector>

#include "grid.h"

 namespace vnn
 {
    std::vector<int> neighbours(Grid* (&g),int& i, int& j)
    {

        std::vector<int> v;
        int width=g->size(0);
        int height=g->size(1);

        if(i>0)v.push_back(g->get(i-1,j));//N
        else v.push_back(-1);
        if(j<width-1)v.push_back(g->get(i,j+1));//E
        else v.push_back(-1);
        if(i<height-1)v.push_back(g->get(i+1,j));//S
        else v.push_back(-1);
        if(j>0)v.push_back(g->get(i,j-1));//W
        else v.push_back(-1);
        return v;
    }
}
#endif // VON_NEUMAN_1_H
